/**
 * 
 */
package org.store.book.pages;

import java.util.List;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.model.IModel;
import org.apache.wicket.request.mapper.parameter.PageParameters;
import org.store.book.BSApplication;
import org.store.book.BookStoreSession;
import org.store.book.model.Book;
import org.store.book.model.Cart;

/**
 * @author Uday Shankar
 * 
 */
public abstract class BSBasePage extends WebPage {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	/**
	 * 
	 */
	public BSBasePage() {

	}

	/**
	 * @param model
	 */
	public BSBasePage(IModel<?> model) {
		super(model);

	}

	/**
	 * @param parameters
	 */
	public BSBasePage(PageParameters parameters) {
		super(parameters);

	}

	public BookStoreSession getBSSession() {
		return (BookStoreSession) getSession();
	}

	public Cart getCart() {
		return getBSSession().getCart();
	}

	public List<Book> getBookList() {
		return BSApplication.get().getBookList();
	}
}
